#pragma once
#include"RBTree.h"
namespace bit
{
	template<class K>
	class Myset
	{
	public:
		struct KeyofT
		{
			const K& operator()(const K& _k)
			{
				return _k;
			}
		};
		typedef  typename  RBTree<K, K, KeyofT>::const_iterator  iterator;
		typedef  typename RBTree<K, K, KeyofT>::const_iterator  const_iterator;
		iterator begin()
		{
			return root.begin();
		}
		iterator end()
		{
			return root.end();
		}
		const_iterator begin()const
		{
			return root.begin();
		}
		const_iterator end()const
		{
			return root.end();
		}
		pair<iterator, bool> insert(const K& key)
		{
			
			pair<typename _TreeIterator<K, K, KeyofT>::iterator, bool> it = root.Insert(key);
			return pair<iterator, bool>(it.first, it.second);
		}
	private:
		RBTree<K, K, KeyofT> root;
	};
}